<link href="css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
<script src="js/plugins/sweetalert/sweetalert.min.js"></script>
	  <!-- 全局js -->
    <script src="js/jquery.min.js?v=2.1.4"></script>
    <script src="js/bootstrap.min.js?v=3.3.6"></script>



    <!-- ECharts -->
    <script src="js/plugins/echarts/echarts-all.js"></script>

    <!-- 自定义js -->
    <script src="js/content.js?v=1.0.0"></script>


    <!-- ECharts demo data -->
    <script src="js/demo/echarts-demo.js"></script>
<?php
/*
项目名称：在线简历填写+公众号简历状态实时推送查询系统
微信消息接口开发：@刘继鹏Beta
程序开发：@刘继鹏Beta
前端设计:@刘继鹏Beta
MYSQL：@刘继鹏Beta
开发日期：2017/02/13
*/
include('wx_config.php');
$username=$_POST['username'];
$password=md5($_POST['password']);
 session_start();
if($_GET['action']=='login'){
if($username=='' || $password==''){
	 exit( ' <script>$(document).ready(function () { swal({title: 
	"用户名或密码不能为空",
                    type: "error"
					
                }, function() {location.href="login.php";});
          
        });
    </script>');
}
$query = mysql_query("select * from users where username='$username' and password='$password' limit 1");  
if($row = mysql_fetch_array($query))
{
$_SESSION['username'] = $row['username'];
$_SESSION['userflag'] = $row['userflag'];
$_SESSION['time']=time();
exit( ' <script>$(document).ready(function () { swal({title: 
	"登录成功！",
                    type: "success"
					
                }, function() {top.location.href="admin.php";});
          
        });
    </script>');
}else{
 exit( ' <script>$(document).ready(function () { swal({title: 
	"用户名或密码错误",
                    type: "error"
					
                }, function() {location.href="login.php";});
          
        });
    </script>');
}
}
 if($_GET['action']=='exit'){
 	 session_start();
if(isset($_SESSION['username']))
{
unset($_SESSION['username']);
unset($_SESSION['passcode']);
unset($_SESSION['userflag']);
   exit( ' <script>$(document).ready(function () { swal({title: 
	"注销成功！",
                    type: "success"
					
                }, function() {top.location.href="login.php";});
          
        });
    </script>');
 }else{
   exit( ' <script>$(document).ready(function () { swal({title: 
	"抱歉，你还未登录哦！",
                    type: "error"
					
                }, function() {location.href="login.php";});
          
        });
    </script>');
 }}
  if($_GET['action']=='eit'){
if(isset($_SESSION['username']))
{
$id=$_GET['id'];
 mysql_query("DELETE FROM `jianli`.`lj_data` WHERE `lj_data`.`id` = $id");
  exit( ' <script>$(document).ready(function () { swal({title: 
	"删除成功",
                    type: "success"
					
                }, function() {location.href=document.referrer;});
          
        });
    </script>');
}
	else
{
   exit( ' <script>$(document).ready(function () { swal({title: 
	"抱歉，你还未登录哦！",
                    type: "error"
					
                }, function() {location.href="login.php";});
          
        });
    </script>');
}
 }
?>